/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sudoku;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
 *
 * @author user3
 */
public class Squre extends JButton implements ActionListener{

	private int num;
	private boolean[] cans;

	public final int length;

	public static Dimension dim = new Dimension(200, 200);

	public Squre(int len) {
		num = 0;
		cans = new boolean [len];
		for(boolean b : cans) {
			b = true;
		}
		length = len;
		addActionListener(this);
	}

	@Override
	public Dimension getMinimumSize() {
		return dim;
	}

	@Override
	public Dimension getPreferredSize() {
		return dim;
	}

	@Override
	public Dimension getMaximumSize() {
		return dim;
	}

	public void set(int n) {
		num = n;
	}

	public void cant(int n) {
		cans[n] = false;
	}

	public boolean can(int n) {
		return cans[n];
	}

	public int get() {
		return num;
	}

	public void actionPerformed(ActionEvent e) {
		
	}
}
